﻿#define _CRT_SECURE_NO_WARNINGS 1
#include <stdio.h>

int main()
{
    int a = 0, b = 0, c = 0;
    scanf("%d %d", &a, &b);
    switch (a)
    {
    case 12:
        c += 30;
    case 11:
        c += 31;
    case 10:
        c += 30;
    case 9:
        c += 31;
    case 8:
        c += 31;
    case 7:
        c += 30;
    case 6:
        c += 31;
    case 5:
        c += 30;
    case 4:
        c += 31;
    case 3:
        c += 28;
    case 2:
        c += 31;
    case 1:
        c += b;
        printf("%d月%d日是平年的第%d天", a, b, c);
    }
    return 0;
}